<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <span>
        <div>
            firstName:<input v-model="firstName">
        </div>
        <div>
            lastName:<input v-model="lastName">
        </div>
        <div>
            fullName:<span>{{fullName}}</span>
        </div>
    </span>
</div>
<script type="text/javascript" src="js/vue.min.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
            firstName: 'Jim',
            lastName: 'green',
            fullName: 'Jim green'
        },
        watch: {
            firstName: function (val) {
                this.fullName = val + " " + this.lastName;
            },
            lastName: function (val) {
                this.fullName = this.firstName + " " + val;
            }
        }
    })
</script>
</body>
</html>